﻿/*****************************************************
**Copyright(C), 2021-2022, Ciqtek Technology.
**Version:     2.0
**Author:      hujiarui
**Date:        2023/06/28
**Description: 基类Item派生类，椭圆
*****************************************************/

#ifndef ELLIPSEGRAPHICSITEM_H
#define ELLIPSEGRAPHICSITEM_H

#include "../../ofuidll_global.h"

#include "RectGraphicsItem.h"

namespace OfUI {

	class OFUIDLL_EXPORT EllipseGraphicsItem : public RectGraphicsItem
	{
		Q_OBJECT
			Q_INTERFACES(QGraphicsItem)

	public:
		/**
		 * @brief  EllipseGraphicsItem 构造函数
		 * @param  parent
		 * @return
		 */
		EllipseGraphicsItem(QGraphicsItem *parent = 0);

		/**
		 * @brief  ~EllipseGraphicsItem 析构函数
		 * @return
		 */
		virtual ~EllipseGraphicsItem();

	public:
		/**
		 * @brief  select 坐标选择拖拽类型
		 * @param  point
		 * @param  selType
		 * @return BaseGraphicsItem::MouseDragType
		 */
		MouseDragType select(const QPointF& point, int* selType = nullptr) const override;

	protected:
		/**
		 * @brief  paint 重写paint
		 * @param  painter
		 * @param  option
		 * @param  widget
		 * @return void
		 */
		void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget /* = nullptr */) override;
	};

}

#endif // ELLIPSEGRAPHICSITEM_H
